
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type MemberShipRequest struct {

	Type string `json:"type" form:"type"`

	Title string `json:"title" form:"title"`

	VipDay string `json:"vip_day" form:"vip_day"`

	Price string `json:"price" form:"price"`

	PrePrice string `json:"pre_price" form:"pre_price"`

	Sort string `json:"sort" form:"sort"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *MemberShipRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *MemberShipRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"type": "required",

		"title": "required",

		"vip_day": "required",

		"price": "required",

		"pre_price": "required",

		"sort": "required",

		"is_del": "required",

		"add_time": "required",

	}
}

func (r *MemberShipRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *MemberShipRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *MemberShipRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
